package com.haha.controller;

import java.util.HashMap;
import java.util.Map;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {

  @GetMapping("get")
  public Map<String, String> getNoParams() {
    Map<String, String> map = new HashMap<>();
    map.put("name", "张瑀楠");
    return map;
  }

  @GetMapping("getWithParams")
  public Map<String, String> getWithParams(String idCard) {
    Map<String, String> map = new HashMap<>();
    map.put("idCard", idCard);
    map.put("name", "张瑀楠");
    return map;
  }

}
